<h2>ledger_create</h2>
<hr>
<p>
<strong>Function</strong> - Create a subordinate ledger.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   ledger_create</strong>
                <strong>(ledger_port_t</strong>                    <var>parent_ledger</var>,
                 <strong>ledger_port_t</strong>                    <var>ledger_ledger</var>,
                 <strong>ledger_port_t</strong>                     <var>child_ledger</var>,
                 <strong>ledger_item_t</strong>                         <var>transfer</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>parent_ledger</var> 
<dd>
[in ledger send right]
The parent ledger.
<p>
<dt> <var>ledger_ledger</var> 
<dd>
[in ledger send right]
The wired kernel memory ledger providing the 
space from which the ledger itself is drawn.
<p>
<dt> <var>child_ledger</var> 
<dd>
[out ledger send right]
The new child ledger, of the same resource type 
as the parent ledger.
<p>
<dt> <var>transfer</var> 
<dd>
[in scalar]
The resource amount to transfer to the new ledger.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong>ledger_create</strong> function creates a subordinate ledger.
Resource limits can be 
transferred from the parent ledger.  The child ledger itself
is accounted against 
the <var>ledger_ledger</var>.  A new ledger inherits the remote service port.
<h3>NOTES</h3>
<p>
This interface is not implemented in OSF/1 R1.3.
<p>
A ledger limit of <strong>LEDGER_ITEM_INFINITE</strong> allows any amount (even
infinity) to be withdrawn.  The root ledger has such a limit.
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>
<dd>
Transferring the resources would cause the parent ledger to exceed its 
limits.
<p>
<dt> <strong>KERN_INVALID_LEDGER</strong>
<dd>
<var>ledger_ledger</var> is not a wired kernel memory ledger.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="ledger_transfer.html"><strong>ledger_transfer</strong></a>,
<a href="ledger_terminate.html"><strong>ledger_terminate</strong></a>,
<a href="ledger_read.html"><strong>ledger_read</strong></a>,
<a href="ledger_set_remote.html"><strong>ledger_set_remote</strong></a>.
